package com.gongj.jedis.BloomfIter;

import io.rebloom.client.Client;
import redis.clients.jedis.JedisPool;
import redis.clients.jedis.JedisPoolConfig;

/**
 * @program: redis
 * @description:
 * @author: gongj
 * @Description: TODO
 * @create: 2020-07-19 12:28
 **/
public class BloomFilter {
    public static void main(String[] args) {
        JedisPoolConfig config = new JedisPoolConfig();
        // 最大连接数
        config.setMaxTotal(1000);
        // 最大连接空闲数
        config.setMaxIdle(200);
        JedisPool jedisPool = new JedisPool(config, "47.105.198.54", 6379,10000,"yj19980402");
        Client client = new Client(jedisPool);
        for (int i = 0; i < 100000; i++) {
            client.add("name","gongj-" + i);
        }
        //检查数据是否存在
        boolean exists = client.exists("name", "gong111j-9999992229");
        System.out.println(exists);
    }
}
